#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>


extern "C"{
    #include <stdio.h>
    #include <sys/types.h>
    #include <fcntl.h>
    #include <sys/stat.h>
    #include <unistd.h>
    #include <pthread.h>
    #include <semaphore.h>
    #include <stdlib.h>
}

class Mythread : public QThread
{
    Q_OBJECT
public:
    explicit Mythread(QObject *parent = nullptr);

    int ret = 0;
    int fifo2_fd = 0;
    float adc_data_f = 0;
//    QString val_raw;
    unsigned char val_raw[4] = {0};

signals:
    void adc_task_signal(QString str);

private:
    void run() override;

};

#endif // MYTHREAD_H



